package com.xidian.zhiancloud.service.riskcontrol.riskidenva;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xidian.zhiancloud.dao.riskcontrol.riskidenva.TRiskCheckProcessMapper;
import com.xidian.zhiancloud.model.riskcontrol.TRiskCheckItemsList;
import com.xidian.zhiancloud.model.riskcontrol.TRiskCheckProcessList;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


/**
 * 风险辨识评价计划-流程记录查看
 */
@Service
public class TRiskCheckProcessService extends
        ServiceImpl<TRiskCheckProcessMapper, TRiskCheckProcessList> {

    @Autowired
    TRiskCheckProcessMapper tRiskCheckProcessMapper;

    //风险辨识-风险辨识-添加/编辑检查项
    public int insertTRiskCheckProcess(TRiskCheckProcessList tRiskCheckItems){
        List<TRiskCheckProcessList> checkproList = new ArrayList<>();
        checkproList.add(tRiskCheckItems);
        return tRiskCheckProcessMapper.insertTRiskCheckProcess(checkproList);
    }

    public TRiskCheckProcessList getByCheProcAndAndTaskAllocatId(Long companyId,String taskAllocatId){
        return tRiskCheckProcessMapper.getByCheProcAndAndTaskAllocatId(companyId, taskAllocatId);
    }
    
    public List<TRiskCheckProcessList> getByDepaReviewer(Long companyId,String userId){
        return tRiskCheckProcessMapper.getByDepaReviewer(companyId, userId);
    }

    public List<TRiskCheckProcessList> getBySecurityReviewer(Long companyId,String userId){
        return tRiskCheckProcessMapper.getBySecurityReviewer(companyId, userId);
    }

    public List<TRiskCheckProcessList> getByEndReviewer(Long companyId,String userId){
        return tRiskCheckProcessMapper.getByEndReviewer(companyId, userId);
    }


    public List<TRiskCheckProcessList> getByCheProcAndTRiskidentevalsId(
        Long companyId,String triskidentevalsId){
        return tRiskCheckProcessMapper.getByCheProcAndTRiskidentevalsId(companyId, triskidentevalsId);
    }

}
